how single responsibility principle works